﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace jnxc.Web.ecshop
{
    public partial class shownew : System.Web.UI.Page
    {
        public string strid = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (Request.Params["id"] != null && Request.Params["id"].Trim() != "")
                {
                    strid = Request.Params["id"];
                    int pid = (Convert.ToInt32(strid));
                    ShowInfo(pid);
                }
            }
        }

        private void ShowInfo(int pid)
        {
            jnxc.BLL.nnews bll = new jnxc.BLL.nnews();
            DataSet ds = bll.GetList(" nid="+pid);
            if (ds.Tables[0].Rows.Count == 1)
            {
                //this.lblcid.Text = ds.Tables[0].Rows[0]["cname"].ToString();
                this.lblpname.Text = ds.Tables[0].Rows[0]["ntitle"].ToString();
                this.lblppara.Text = ds.Tables[0].Rows[0]["ncontent"].ToString();
                
                this.Title = this.lblpname.Text;
            }

        }
    }
}